//---------------------------------------------------------------------- // attach a shader to the group TQ3Status MyAddShaderToGroup( TQ3GroupObject group ) { TQ3ShaderObject illuminationShader = Q3PhongIllumination_New(); Q3Group_AddObject(group, illuminationShader); Q3Object_Dispose(illuminationShader); return(kQ3Success); }
Alternatively, you can create a shader object, and draw it before any of your geometries in your submit procedure. Remember that if you are using a plain display group, the shader object must be the first object placed in the group, or all the objects that are put in the group before the shader will be flat-shaded (this does not apply to ordered display groups).
The latest samples, libraries, and headers are available on the Developer CD.
See also Apple's QuickDraw 3D home page
for the most current 3D development information.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help